package com.ruoyi.service.impl;

import com.ruoyi.domain.CustomerAddress;
import com.ruoyi.mapper.CustomerAddressMapper;
import com.ruoyi.mapper.CustomerInfoMapper;
import com.ruoyi.service.ICustomerAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CustomerAddressServiceImpl implements ICustomerAddressService {
    @Autowired
    CustomerAddressMapper customerAddressMapper;

    @Override
    public List<CustomerAddress> list() {
        return customerAddressMapper.selectList();
    }

    @Override
    public List<CustomerAddress> listForPage(CustomerAddress customerAddress) {
        return customerAddressMapper.selectListForPage(customerAddress);
    }

    @Override
    public CustomerAddress getById(Long id) {
        return customerAddressMapper.selectByPrimaryKey(id);
    }

    @Override
    public int save(CustomerAddress customerAddress) {
        return customerAddressMapper.insertSelective(customerAddress);
    }

    @Override
    public int updateById(CustomerAddress customerAddress) {
        return customerAddressMapper.updateByPrimaryKeySelective(customerAddress);
    }

    @Override
    public int removeByIds(Long[] ids) {
        return customerAddressMapper.deleteByPrimaryKeys(ids);
    }
}
